package com.baifc.wiringbean.config;

import com.baifc.wiringbean.conditionbean.MagicBean;
import com.baifc.wiringbean.conditionbean.MagicExistsCondition;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;

/**
 * projectName: spring-in-action
 * packageName: com.baifc.wiringbean.config
 * Created: 2019/5/2.
 * Auther: baifc
 * Description:
 */
@Configuration
public class MagicConfig {

    @Bean
    @Conditional(MagicExistsCondition.class)
    public MagicBean magicBean() {
        return new MagicBean();
    }
}
